package com.chengduservice;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@MapperScan({"com.chengduservice.dao", "com.chengduservice.mapper"})
@SpringBootApplication
public class ChengduServiceApplication extends SpringBootServletInitializer {
    private static final Logger logger = LoggerFactory.getLogger(ChengduServiceApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(ChengduServiceApplication.class, args);

        logger.info("chendu service start successfully");
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        logger.info("chendu service start successfully in builder");
        return builder.sources(ChengduServiceApplication.class);
    }
}
